import request from '@/utils/request'
import {list} from "../monitor/operlog";

const PATH = '/crm/clueTrack';

// 查询线索追踪列表
export function listClueTrack(query) {
  return list(query);
}

// 新增线索跟踪记录
export function addClueTrack(data) {
  return request({
    url: PATH,
    method: 'post',
    data: data
  })
}

// 伪线索上报
export function falseClue(data) {
  return request({
    url: PATH,
    method: 'PUT',
    data: data
  })
}

// 转商机
export function transform2Business(data) {
  return request({
    url: `${PATH}/transform`,
    method: 'PUT',
    data: data
  })
}

// 捞取线索
export function resetClue(id) {
  return request({
    url: `${PATH}/resetClue`,
    method: 'PUT',
    data: {id: id, record: '重新捞取线索'}
  })
}
